import request from './request.js'
const { httpGet,httpPost } = request;

// 获取任务列表
export const taskList = ()=>{
    return new Promise((resolve,reject)=>{
        httpGet('/taskList').then(res =>{
            resolve(res)
        })
    })
}

// 添加
export const taskAdd = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/taskAdd',data).then(res =>{
            resolve(res)
        })
    })
}

// 修改
export const taskEdit = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/taskEdit',data).then(res =>{
            resolve(res)
        })
    })
}


// 删除
export const taskDel = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/taskDel',data).then(res =>{
            resolve(res)
        })
    })
}


// 获取任务列表
export const linkList = ()=>{
    return new Promise((resolve,reject)=>{
        httpGet('/linkList').then(res =>{
            resolve(res)
        })
    })
}

// 添加
export const linkAdd = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/linkAdd',data).then(res =>{
            resolve(res)
        })
    })
}

// 修改
export const linkEdit = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/linkEdit',data).then(res =>{
            resolve(res)
        })
    })
}


// 删除
export const linkDel = (data)=>{
    return new Promise((resolve,reject)=>{
        httpPost('/linkDel',data).then(res =>{
            resolve(res)
        })
    })
}

